package com.icez.demo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import android.widget.Button
import com.icez.demo.databinding.NoticationLayoutBinding
import com.icez.in_app_notication_library.InAppNoticationAdapter
import com.icez.in_app_notication_library.InAppNoticationDismissTouchType
import com.icez.in_app_notication_library.InAppNoticationManager

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val btn = findViewById<Button>(R.id.btn)
        btn.setOnClickListener {
            InAppNoticationManager.create(this).show(Test())
        }

    }
}

class Test: InAppNoticationAdapter<NoticationLayoutBinding>() {
    override fun onStayDuration(): Long {
        return 10000
    }

    override fun onBinding(binding: NoticationLayoutBinding) {

    }

    override fun onItemClick() {

    }

    override fun onLayout(): Int {
        return R.layout.notication_layout
    }

    override fun onTouchDismissDirection(): InAppNoticationDismissTouchType {
        return InAppNoticationDismissTouchType.LeftAndRight
    }

}